#include<stdio.h>
void* my_memmove(void* dest, const void* src, size_t num)
{
	void* ret = dest;
	if (dest >= src)
	{
		while (num--)
		{
			*((char*)dest + num) = *((char*)src + num);
		}
	}
	if(dest < src)
	{
		while (num--)
		{
			*(char*)dest = *(char*)src;
			dest = (char*)dest + 1;
			src = (char*)src + 1;
		}
	}
	return ret;
}
int main()
{
	char arr[] = "ABCDEFG";
	my_memmove(arr + 2, arr, 5 * sizeof(char));
	for (int i = 0; i < 7; i++)
		printf("%c ", arr[i]);
	return 0;
}